home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.4 KB | 51 lines | [TEXT/GEOL] |
- Item forwarded by A33 to A34
-
- Item 2546274 12-Feb-90 18:36PST
-
- From: SATORI Satori SW, Hugh Rogovy,PRT
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: re:How to detect dbl-clicking
-
- ***SORRY, I DON'T KNOW WHAT HAPPENED TO MY ORIGINAL TRANSMISSION***
-
- >> I would like to be able to detect whether a user has double-clicked or
- >> option-clicked on an icon…
-
- Mark,
-
- Off the top of my head……
-
- Regarding the click count, I think you can just look at the variable
- gClickCount.
-
- Due to the way that TControl objects handle mouse events, I think you're going
- to have to get the option-key the old fashioned way (somebody correct me if I'm
- wrong…) by using a keymap. At first glance, I don't see anyway to get access
- to the event record without overriding the tracker command. There may be
- international keyboard problems with the constant kOptionKey (?).
-
- *EXAMPLE*
-
- PROCEDURE TYourIcon.DoChoice(origView: TView; itsChoice: INTEGER);OVERRIDE;
- CONST
- kOptionKey = 58;
- VAR
- theKeyMap: KeyMap;
- OptionClick,
- DublClick: BOOLEAN;
-
- BEGIN
- GetKeys(theKeyMap);
- OptionClick:=(itsChoice=mIconHit) AND theKeyMap[kOptionKey];
- DublClick:=gClickCount {>}= 2;
- {do whatever it is you need to do…}
- …
- END;
-
- Good Luck,
-
- Chris Le Croy
-
-